<?php
namespace Backend\View\Helper;

use Zend\View\Helper\AbstractHelper;

class ControllerNameHelper extends AbstractHelper
{

	protected $routeMatch;

	public function __construct($routeMatch)
	{
		$this->routeMatch = $routeMatch;
	}

	public function __invoke()
	{
		if ($this->routeMatch) {
			$controller = $this->routeMatch->getParam('__CONTROLLER__');
			
// 			print_r($this->routeMatch);
			
			return strtoupper($controller);
		}
	}
}